package cc.lj.internal.merchant.application.event.subscribe;


import cc.lj.internal.merchant.domain.contract.event.ContractDomainEvent;
import cc.lj.internal.merchant.domain.contract.event.MerchantContractToMqEvent;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@EnableBinding(WmsMsgSink.class)
public class WmsMsgConsumer {
    /*
    @StreamListener(WmsMsgSink.TEST_IN)
    public void recMsg(Message<String> message)
    {
        String payload = message.getPayload();
        ContractDomainEvent contractDomainEvent = JSON.parseObject(payload,ContractDomainEvent.class);
        MerchantContractToMqEvent mqEvent = contractDomainEvent.getData();
        System.out.println(mqEvent);
    }
    */
}
